<?php
class b2c_ctl_admin_goods_bagunit extends desktop_controller{
    var $workground = 'b2c.workground.goods';
     public function index() 
    {
		$this->pagedata['unit_arr'] = app::get('b2c')->getConf('goods.bag_unit'); 
        $this->page('admin/goods/bag_unit.html');
    }

    public function save() 
    {
        $this->begin();
        $bag_unit=$_POST['unit'];
        $bag_unit=array_filter($bag_unit);
        $bag_unit=array_unique($bag_unit);
        app::get('b2c')->setConf('goods.bag_unit', $bag_unit);
        $this->end(true, '保存成功');
    }
}
